package com.sgu6.sgu6_machine.db;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.sgu6.sgu6_machine.dto.GoodsSimpleDto;
import com.sgu6.sgu6_machine.dto.ListGoodsSimpleDto;
import com.sgu6.sgu6_machine.dto.MachineConfigDto;
import com.sgu6.sgu6_machine.dto.MachineGoodsDto;
import com.sgu6.sgu6_machine.dto.PhotoDto;
import com.sgu6.sgu6_machine.dto.ChargeDto;
import com.sgu6.sgu6_machine.dto.EletricDto;
import com.sgu6.sgu6_machine.dto.PowerDto;
import com.sgu6.sgu6_machine.dto.VoltageDto;

import com.sgu6.sgu6_machine.db.GoodsSimpleDtoDao;
import com.sgu6.sgu6_machine.db.ListGoodsSimpleDtoDao;
import com.sgu6.sgu6_machine.db.MachineConfigDtoDao;
import com.sgu6.sgu6_machine.db.MachineGoodsDtoDao;
import com.sgu6.sgu6_machine.db.PhotoDtoDao;
import com.sgu6.sgu6_machine.db.ChargeDtoDao;
import com.sgu6.sgu6_machine.db.EletricDtoDao;
import com.sgu6.sgu6_machine.db.PowerDtoDao;
import com.sgu6.sgu6_machine.db.VoltageDtoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig goodsSimpleDtoDaoConfig;
    private final DaoConfig listGoodsSimpleDtoDaoConfig;
    private final DaoConfig machineConfigDtoDaoConfig;
    private final DaoConfig machineGoodsDtoDaoConfig;
    private final DaoConfig photoDtoDaoConfig;
    private final DaoConfig chargeDtoDaoConfig;
    private final DaoConfig eletricDtoDaoConfig;
    private final DaoConfig powerDtoDaoConfig;
    private final DaoConfig voltageDtoDaoConfig;

    private final GoodsSimpleDtoDao goodsSimpleDtoDao;
    private final ListGoodsSimpleDtoDao listGoodsSimpleDtoDao;
    private final MachineConfigDtoDao machineConfigDtoDao;
    private final MachineGoodsDtoDao machineGoodsDtoDao;
    private final PhotoDtoDao photoDtoDao;
    private final ChargeDtoDao chargeDtoDao;
    private final EletricDtoDao eletricDtoDao;
    private final PowerDtoDao powerDtoDao;
    private final VoltageDtoDao voltageDtoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        goodsSimpleDtoDaoConfig = daoConfigMap.get(GoodsSimpleDtoDao.class).clone();
        goodsSimpleDtoDaoConfig.initIdentityScope(type);

        listGoodsSimpleDtoDaoConfig = daoConfigMap.get(ListGoodsSimpleDtoDao.class).clone();
        listGoodsSimpleDtoDaoConfig.initIdentityScope(type);

        machineConfigDtoDaoConfig = daoConfigMap.get(MachineConfigDtoDao.class).clone();
        machineConfigDtoDaoConfig.initIdentityScope(type);

        machineGoodsDtoDaoConfig = daoConfigMap.get(MachineGoodsDtoDao.class).clone();
        machineGoodsDtoDaoConfig.initIdentityScope(type);

        photoDtoDaoConfig = daoConfigMap.get(PhotoDtoDao.class).clone();
        photoDtoDaoConfig.initIdentityScope(type);

        chargeDtoDaoConfig = daoConfigMap.get(ChargeDtoDao.class).clone();
        chargeDtoDaoConfig.initIdentityScope(type);

        eletricDtoDaoConfig = daoConfigMap.get(EletricDtoDao.class).clone();
        eletricDtoDaoConfig.initIdentityScope(type);

        powerDtoDaoConfig = daoConfigMap.get(PowerDtoDao.class).clone();
        powerDtoDaoConfig.initIdentityScope(type);

        voltageDtoDaoConfig = daoConfigMap.get(VoltageDtoDao.class).clone();
        voltageDtoDaoConfig.initIdentityScope(type);

        goodsSimpleDtoDao = new GoodsSimpleDtoDao(goodsSimpleDtoDaoConfig, this);
        listGoodsSimpleDtoDao = new ListGoodsSimpleDtoDao(listGoodsSimpleDtoDaoConfig, this);
        machineConfigDtoDao = new MachineConfigDtoDao(machineConfigDtoDaoConfig, this);
        machineGoodsDtoDao = new MachineGoodsDtoDao(machineGoodsDtoDaoConfig, this);
        photoDtoDao = new PhotoDtoDao(photoDtoDaoConfig, this);
        chargeDtoDao = new ChargeDtoDao(chargeDtoDaoConfig, this);
        eletricDtoDao = new EletricDtoDao(eletricDtoDaoConfig, this);
        powerDtoDao = new PowerDtoDao(powerDtoDaoConfig, this);
        voltageDtoDao = new VoltageDtoDao(voltageDtoDaoConfig, this);

        registerDao(GoodsSimpleDto.class, goodsSimpleDtoDao);
        registerDao(ListGoodsSimpleDto.class, listGoodsSimpleDtoDao);
        registerDao(MachineConfigDto.class, machineConfigDtoDao);
        registerDao(MachineGoodsDto.class, machineGoodsDtoDao);
        registerDao(PhotoDto.class, photoDtoDao);
        registerDao(ChargeDto.class, chargeDtoDao);
        registerDao(EletricDto.class, eletricDtoDao);
        registerDao(PowerDto.class, powerDtoDao);
        registerDao(VoltageDto.class, voltageDtoDao);
    }
    
    public void clear() {
        goodsSimpleDtoDaoConfig.getIdentityScope().clear();
        listGoodsSimpleDtoDaoConfig.getIdentityScope().clear();
        machineConfigDtoDaoConfig.getIdentityScope().clear();
        machineGoodsDtoDaoConfig.getIdentityScope().clear();
        photoDtoDaoConfig.getIdentityScope().clear();
        chargeDtoDaoConfig.getIdentityScope().clear();
        eletricDtoDaoConfig.getIdentityScope().clear();
        powerDtoDaoConfig.getIdentityScope().clear();
        voltageDtoDaoConfig.getIdentityScope().clear();
    }

    public GoodsSimpleDtoDao getGoodsSimpleDtoDao() {
        return goodsSimpleDtoDao;
    }

    public ListGoodsSimpleDtoDao getListGoodsSimpleDtoDao() {
        return listGoodsSimpleDtoDao;
    }

    public MachineConfigDtoDao getMachineConfigDtoDao() {
        return machineConfigDtoDao;
    }

    public MachineGoodsDtoDao getMachineGoodsDtoDao() {
        return machineGoodsDtoDao;
    }

    public PhotoDtoDao getPhotoDtoDao() {
        return photoDtoDao;
    }

    public ChargeDtoDao getChargeDtoDao() {
        return chargeDtoDao;
    }

    public EletricDtoDao getEletricDtoDao() {
        return eletricDtoDao;
    }

    public PowerDtoDao getPowerDtoDao() {
        return powerDtoDao;
    }

    public VoltageDtoDao getVoltageDtoDao() {
        return voltageDtoDao;
    }

}
